<template>
  <div class="ordering">
    <div class="heading">企业审核表</div>
    <div>
      <el-table :data="tableData" height="550" style="width: 100%">
        <el-table-column prop="companyName" label="企业名" min-width="100" />
        <el-table-column prop="companyPhone" label="联系方式" min-width="100" />
        <el-table-column prop="companyInfo" label="企业信息" min-width="100" />
        <el-table-column prop="companyTrade" label="行业" min-width="100" />
        <el-table-column fixed="right" label="审核员" min-width="100">
          <template #default><!-- 此处使用级联选择器，先选择专业方向再选企业 -->
            <el-cascader :options="options" clearable />
            <el-button size="small" type="danger" @click="handleDelete(scope.$index, scope.row)">分配</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script setup>
import { ref, onBeforeMount } from 'vue'
import requests from '@/api/ajax.js'


const handleClick = () => {
  console.log('click')
}

const tableData = ref([{
  companyId:'',
  companyName:'',
  companyPhone:'',
  companyInfo:'',
  companyTrade:'',
}])

onBeforeMount (() =>{

//请求能够发出组队邀请的学生信息
  const aacom = requests({ url: "/outer/campany", method: "get",}).then(res => {
          //存储用户信息到浏览器toke
          const abc =res.rdata
          tableData.value = abc
          console.log(res)
  })
  .catch(err => {
      console.error(err.data);
      // 登录请求失败后的操作
  });
})


const options = [
  {
    value: 'guoli',
    label: '郭老师',
  },
  {
    value: 'zhuyansong',
    label: '朱老师',
  },
  {
    value: 'liubing',
    label: '刘老师',
  },
  {
    value: 'liubing',
    label: '刘老师',
  },
  {
    value: 'liubing',
    label: '刘老师',
  },
  {
    value: 'liubing',
    label: '刘老师',
  },
]

const aaa = [
  {
    date: '2016-05-03',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-02',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-04',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-08',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-06',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-07',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-08',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-06',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-07',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
]
</script>

<style scoped></style>